<!DOCTYPE html>
<html>
<head>
    {include file='public/meta'/}
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/bootstrap-datetimepicker.css"/>

    <script src="__STATIC_URL__/static/js/bootstrap-datetimepicker.js" type="text/javascript" charset="utf-8"></script>

    <style>
        thead tr th {
            text-align: center;
        }

        tbody tr td {
            text-align: center;
        }
        .gift-record select,.gift-record input{
            display: inline-block;
            width: 44%;
            float: left;
        }
        .gift-record input{
            margin-left:5px;
        }
        .form-control {
            background-color: #FFFFFF;
            border: 1px solid #E3E3E3;
            border-radius: 4px;
            color: #565656;
            padding: 7px 12px;
            font-size: 12px;
            height: 38px;
            max-width: 100%;
            -webkit-box-shadow: none;
            box-shadow: none;
            -webkit-transition: all 300ms linear;
            -moz-transition: all 300ms linear;
            -o-transition: all 300ms linear;
            -ms-transition: all 300ms linear;
            transition: all 300ms linear;
        }
        .addcord{
            padding: 0;
            margin-top: 5px;
        }
        .form1 a{
            color: #2db7f5;
            line-height: 35px;
            display: inline-block;
            margin: 0 5px;
        }
    </style>

</head>
<body>
{include file='public/header'/}
<!------------------导航-------------------------->
<section id="content">
    {include file='public/left'/}
    <!--------------------------主要内容区域------------------------------------->
    <div class="content">
        <div class="page-heading mgl15 mgr15">
            <ol class="breadcrumb">
                <li><a href="javascript:history.back(-1)">营销中心</a></li>
                <li class="active">社交立减金</li>
            </ol>
        </div>
        <!--<div class="panel panel-default ng-scope mgl15 mgr15">-->
            <!--<div class="panel-heading">-->
                <!--社交立减金规则列表-->
            <!--</div>-->
            <!--<div class="panel-body">-->
                <!--<table class="table table-bordered">-->
                    <!--<thead>-->
                    <!--<tr>-->
                        <!--<td>编号</td>-->
                        <!--<td>开始时间</td>-->
                        <!--<td>结束时间</td>-->
                        <!--<td>赠送卡券</td>-->
                        <!--<td>创建时间</td>-->
                        <!--<td class="text-center">操作</td>-->
                    <!--</tr>-->
                    <!--</thead>-->
                    <!--<tbody>-->

                    <!--</tbody>-->
                <!--</table>-->
            <!--</div>-->
        <!--</div>-->

        <div class="panel panel-default mgl15 mgr15">

            <form class="form-horizontal" action="" method="post" onsubmit="return check()" >
                <input type="hidden" name="type" value="1">

                <div class="panel-body">
                    <div class="form-horizontal" data-label="appid"
                         data-layout="horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">小程序Appid</label>
                            <div class="col-sm-10">
                                <input type="text" name="activity_tinyappid" class="form-control"  placeholder="请输入小程序Appid" id="activity_tinyappid">
                                <div class="r-message text-danger">用户点击链接后可静默添加到列表的小程序appid；</div>
                            </div>
                            <div class="text-danger"></div>
                        </div>
                    </div>
                    <div class="form-horizontal" data-label="gift_num"
                         data-layout="horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">裂变数量</label>
                            <div class="col-sm-10">
                                <input type="text" name="gift_num" class="form-control"  placeholder="请输入裂变数量" id="gift_num">
                                <div class="r-message text-danger">单个礼包社交立减金数量（3-15个）</div>
                            </div>

                        </div>
                    </div>

                    <div class="form-horizontal" data-label="开始时间"
                         data-layout="horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">开始时间</label>
                            <div class="col-sm-10">
                                <input type="text" name="times" class="form-control" value="" placeholder="请选择开始时间" readonly="readonly" id="starttime">
                                <div class="r-message text-danger"></div>
                            </div>
                        </div>
                    </div>

                    <div class="form-horizontal" data-label="max_partic_times_one_day"
                         data-layout="horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">每日限领(选填)</label>
                            <div class="col-sm-10">
                                <input type="text" name="max_partic_times_one_day" class="form-control"  placeholder="请输入每日限领" id="max_partic_times_one_day">
                                <div class="r-message text-danger">每个用户活动期间单日最大领取次数,最大为50，不填默认为1</div>
                            </div>
                        </div>
                    </div>
                    <div class="form-horizontal" data-label="max_partic_times_act"
                         data-layout="horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">最多可领(选填)</label>
                            <div class="col-sm-10">
                                <input type="text" name="max_partic_times_act" class="form-control"  placeholder="请输入每人最多可领次数" id="max_partic_times_act">
                                <div class="r-message text-danger">每个用户活动期间最大领取次数,最大为50，不填默认为1</div>
                            </div>
                        </div>
                    </div>
                    <div class="form-horizontal" data-label="mch_code"
                         data-layout="horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">商户号</label>
                            <div class="col-sm-10">
                                <input type="text" name="mch_code" class="form-control"  placeholder="请输入商户号" id="mch_code">
                                <div class="r-message text-danger">支付商户号</div>
                            </div>
                        </div>
                    </div>
                    <div class="form-horizontal" data-label="min_amt"
                         data-layout="horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">使用门槛</label>
                            <div class="col-sm-10">
                                <input type="text" name="min_amt" class="form-control"  placeholder="请输入使用门槛" id="min_amt">
                                <div class="r-message text-danger">最少支付金额，单位是分</div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group ">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label "><span class="text-danger">*</span> 选择要赠送的卡券</label>
                        <div class="col-xs-10 col-sm-10 col-md-10 form1" >
                            <div class="gift-record"id="sel1">
                                <select name="card_id"  class="form-control cardsel"id="card_id">
                                    <option value="">--请选择--</option>
                                    {volist name="cardlist" id="vo"}
                                        <option value="{$vo['card_id']}">{$vo['title']}</option>
                                    {/volist}
                                </select>

                            </div>
                            <div class="r-message text-danger">选择要投放设置的卡券</div>
                        </div>
                    </div>

                    <!--<div class="form-group">-->
                        <!--<label class="col-sm-2 control-label ng-binding">状态：</label>-->
                        <!--<div class="col-sm-10">-->
                            <!--<select name="statu" id="" class="form-control">-->
                                <!--&lt;!&ndash;<option value="">&#45;&#45;请选择&#45;&#45;</option>&ndash;&gt;-->
                                <!--<option value="1">开启</option>-->
                                <!--<option value="2">关闭</option>-->
                            <!--</select>-->
                            <!--<div class="r-message text-danger ng-scope ng-inactive"></div>-->
                        <!--</div>-->
                    <!--</div>-->

                </div>
                <div class="panel-footer">
                    <button class="btn btn-success" type="submit">保存</button>
                </div>
            </form>

        </div>
        {include file='public/footer'/}
    </div>
</section>
<script>
    function check(){
        return true;
    }
</script>
<script src="__STATIC_URL__/static/laydate/laydate.js"></script>
<script>
    // var date = new Date();
    // //执行一个laydate实例
    // laydate.render({
    //     elem: '#starttime'
    //     ,type: 'datetime'
    //     ,range: true
    //     ,min:data
    // });

        var laydate = laydate;
        var date = new Date();
        var year = parseInt(date.getFullYear());
        var month = parseInt(date.getMonth())+1;
        var day = parseInt(date.getDate());
        if(month<10){
            month = "0"+month;
        }
        if(day<10){
            day = "0"+day;
        }
        var min = year+"-"+month+"-"+day;
        var date = {
            type: 'datetime',
            min:min,
            range:'-',
            trigger: 'click'
        };
        date.elem = '#starttime';
//执行一个laydate
        laydate.render(date);

</script>
<script>

    function delsel(obj){
//
        $(obj).parent().remove();


    }

</script>
</body>

</html>
